package lab02.test19;

public class Test19 {
    public static void main(String[] args) {
        char[] name =new char[] {'H','e','l','l','o','W','o','r','l','d'};
        StringBuffer SB=new StringBuffer();
        for (int i=0;i<name.length;i++){
            if (name[i]>='a'&& name[i]<='z'){

                SB.append(String.valueOf(name[i]).toUpperCase());//将小写字母转化为大写

            }else if (name[i]>='A'&& name[i]<='Z'){

                SB.append(String.valueOf(name[i]).toLowerCase());// 将大写字母转化为小写

            }
        }
        System.out.println("转化后输出："+SB );
    }
}
